<?php
namespace Admin\Model;
use Think\Model;


class AreaModel extends  Model{

    public function getArea($list){

        foreach($list as $key=>$value) {
            $where='id='.$value['area_id'];
            $list[$key]['area_id']= $this->where($where)->find()['name'];
        }

        return $list;
    }

    public function getAll(){
        $list=$this->select();
        return $list;
    }

    public function getId($where){
        $id=$this->where($where)->find()['id'];
        return $id;
    }


}